<?php


namespace app\controller;


use fast\Http;
use think\facade\Request;

class Interfaces extends BackendController{
    protected $model = null;
    public function _initialize()
    {
        //parent::_initialize();
        $this->model = new \app\model\Push();
    }

    public function get28181allchannel(){
        $url='http://127.0.0.1:18000/api/v1/channelsconfig?start=0&limit=200';

        $res=Http::get($url,[],[CURLOPT_HTTPHEADER=>['Content-Type:application/json;charset=UTF-8;']]);
        // var_dump($res);
        $this->success('推送成功',json_decode($res));
    }
    public function get28181channelstream(){
        $url='http://127.0.0.1:18000/api/v1/devices/channelstream?';

        $res=Http::get($url.http_build_query(input('get.')));
        // var_dump($res);
        $this->success('获取成功',json_decode($res));
    }
    public function u2(){
        $url='http://220.166.79.246:18000/api/v1/devices/channelstream?';
        //echo $url.http_build_query(input('get.'));

        $res=Http::get($url.http_build_query(input('get.')));

        $this->success('推送成功',$res);
    }

}